<template>
  <div class="important-people-early-warning">
    <nanning-screen-border-box :bgImg="bgImg">
      <screen-title>重点人员人脸实时预警</screen-title>
      <div class="important-people-early-warning-content">
        <div class="swiper-container">
          <swiper :options="swiperOption">
            <swiper-slide v-for="(item, index) in [1,2,3,4,5,6]" :key="index">
              <div class="item">
                <div class="pic">
                  <img src="../../../../assets/images/traffic.jpg" alt="车流" />
                  <div class="tip">2021-8-12 15:50:20</div>
                </div>
                <div class="detail">
                  <div class="name">杨波</div>
                  <div class="location">
                    <div class="location-icon">
                      <img src="../../../../assets/images/location.png" alt="定位" />
                    </div>
                    <div class="location-content">青岛市李沧区鞍山路校区中心公园160号</div>
                  </div>
                  <div class="type">
                    <div class="type-icon">
                      <img src="../../../../assets/images/type.png" alt="类型" />
                    </div>
                    <div class="type-content">类型: <span>蛇毒</span></div>
                  </div>
                </div>
              </div>
            </swiper-slide>
          </swiper>
        </div>
      </div>
    </nanning-screen-border-box>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { Swiper, SwiperSlide } from 'vue-awesome-swiper'
import 'swiper/css/swiper.css'
@Component({
  name: 'important-people-early-warning',
  components: {
    Swiper,
    SwiperSlide
  }
})
export default class ImportantPeopleEarlyWarning extends Vue {
  private bgImg: string = require('assets/images/box-border-4.png')
  private swiperOption: any = {
    direction: 'horizontal',
    slidesPerView: 2.5,
    loop: true,
    autoplay: {
      delay: 2000,
      stopOnLastSlide: false,
      disableOnInteraction: true
    }
  }
}
</script>

<style lang="scss">
img {
  width: 100%;
  height: 100%;
  float: left;
}
.important-people-early-warning {
  width: 100%;
  height: 24.92%;
  &-content {
    width: 100%;
    height: calc(100% - 50px);
    box-sizing: border-box;
    padding: 0px 15px 20px 15px;
    display: flex;
    align-items: center;
    .swiper-container {
      width: 100%;
      height: 140px;
      .swiper-slide {
        height: 100%;
        width: 180px;
        box-sizing: border-box;
        padding-right: 10px;
        .item {
          width: 100%;
          height: 100%;
          display: flex;
          align-items: center;
          justify-content: center;
          background: rgba(4, 10, 51, 0.41);
          box-sizing: border-box;
          padding: 10px 0 10px 10px;
          display: flex;
          align-items: center;
          .pic {
            width: 210px;
            height: 100%;
            position: relative;
            margin-right: 10px;
            .tip {
              position: absolute;
              left: 0;
              bottom: 0;
              width: 100%;
              height: 24px;
              background: rgba(0, 0, 0, 0.64);
              display: flex;
              align-items: center;
              text-indent: 10px;
              font-size: 14px;
              font-family: 'PingFang Regular';
              font-weight: 400;
              color: #ffffff;
            }
          }
          .detail {
            width: calc(100% - 210px - 10px);
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            .name {
              font-size: 20px;
              font-family: 'PingFang Regular';
              font-weight: 500;
              color: #ffffff;
              text-align: left;
              line-height: 36px;
            }
            .location {
              width: 100%;
              display: flex;
              .location-icon {
                width: 12px;
                height: 14px;
                margin-right: 8px;
                position: relative;
                top: 3px;
              }
              .location-content {
                width: calc(100% - 20px);
                font-size: 14px;
                font-family: 'PingFang Regular';
                font-weight: 400;
                color: #ffffff;
                opacity: 0.86;
                text-align: left;
                line-height: 20px;
                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box;
                -webkit-line-clamp: 3;
                -webkit-box-orient: vertical;
              }
            }
            .type {
              width: 100%;
              display: flex;
              align-items: center;
              .type-icon {
                width: 12px;
                height: 12px;
                margin-right: 8px;
              }
              .type-content {
                width: calc(100% - 20px);
                text-align: left;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                font-size: 14px;
                font-family: 'PingFang Regular';
                font-weight: 400;
                color: rgba(255, 255, 255, 0.86);
                line-height: 24px;
                span {
                  font-weight: 500;
                  color: #ff8726;
                }
              }
            }
          }
        }
      }
    }
  }
}
</style>
